
import { createRouter, createWebHistory } from 'vue-router';
import { isRuleRouter,baseRouter } from '../util/isRlueRouter';
import {useStore} from 'vuex'
import ruleStore from '../vuex/ruleStore'
//拿到vuex中的数据 渲染到router中 实现权限管理
//(store.state as any)?.ruleStore as Array <RouteRecordRaw>
//判断后的路由
//先执行  sessionStorage 后存
var routes=ruleStore.state.ruleRouter
  
const router=createRouter({
    history:createWebHistory(),
    routes
})
export default router
